home *** CD-ROM | disk | FTP | other *** search
- TRIMCOL, version 1.3.
- Written by Walter Kennamer, 74025,514, 5/24/85.
-
- TRIMCOL Extracts text between two columns (inclusive). This program was
- designed to work in conjunction with other text utilities to provide a set
- of text operator primitives. TRIMCOL can be used, for example, to add
- or delete fields in fixed length records.
-
- USAGE: TRIMCOL -args input output
- where args are:
- f Work as a filter (input and output are stdin and stdout).
- bx Extract beginning at column 'x' (default = 0)
- ey Extract ending at column 'y' (default = EOL)
- rz Extract ending at 'z' columns from end of line (default = 0)
- ^ Negates other arguments. For example, the argument string
- -b5e10^ means "extract everything but the characters
- between columns 5 and 10."
-
- The input file must have a different name than the output file. The input
- file is never changed.
-
- Examples:
-
- 1) TRIMCOL -fb10e20 <input >output
-
- instructs the program to work as a filter, extracting text
- between columns 10 and 20.
-
- 2) TRIMCOL -b2r1 input output
-
- instructs the program to extract all but the first and last column
- from the input file, creating the output file. If 'output' already exists,
- it will be overwritten.
-
- 3) TRIMCOL -b21e60^ input output
-
- will extract all of the input file except columns 21 through 60. This
- example deletes columns 21 through 60 (inclusive).
-
- Restrictions and other notes
-
- Lines cannot be longer than 1000 characters.
- All arguments are optional.
- Arguments can be entered in any order and in upper or lower case.
- Filenames cannot contain wildcards.
-
- Filters
-
- If the -f argument is entered, TRIMCOL will act as a filter, taking its
- input from stdin and writing its output to stdout. You will normally want
- to redirect keyboard and console input and output when you select this
- option. For example,
-
- TRIMCOL -fb10e20 <input >output
-
- extracts columns 10 through 20 from input and writes them to output. The
- redirection symbols ( '<' and '>' ) are important. If you do not include
- them before your filenames, TRIMCOL will display an error message. See your
- DOS manual if you are not familiar with filters.
-
- If you use TRIMCOL as a filter, the input file must terminate with a
- <ctrl>Z or TRIMCOL will wait a very long time looking for one. Output
- is guaranteed to terminate with a <ctrl>Z. If you are not sure that
- your input file terminates with a <ctrl>Z, use the MARKEOF program to
- be safe.
-